<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div style="width: 200px; height: 25px; background-color: chartreuse;">
        <svg viewBox="0 0 170 25" xmlns="http://www.w3.org/2000/svg">
            <foreignObject width="100%" height="25">     
              <input id="hehe" type="text" style="width: 60%;height:20px;border: 1px solid black;"> 
             <button style="width: 25%;height: 24px;padding: 0;">搜索</button>
           </foreignObject>
          </svg>


          <input type="text" placeholder="nihao" readonly disabled>

          
    </div>
  <script>
      document.getElementById("hehe").oninput=function (params) {
          console.log("oninput");
      }
  </script>
</body>
</html>